package dome2;


public class Text {
    public static void main(String[] args) throws CloneNotSupportedException {
        Animal animal1 = new Animal("小猫");
        Animal animal2 = (Animal) animal1.clone();
        //修改前
        System.out.println(animal1);
        System.out.println(animal2);
        animal1.money.m = 10.0;
        animal1.name = "小华";
        System.out.println("*****************");
        //修改后
        System.out.println(animal1);
        System.out.println(animal2);
    }
}
